<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArNMEAParser Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArNMEAParser.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classArNMEAParser-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArNMEAParser Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>NMEA Parser.  
 <a href="classArNMEAParser.html#details">More...</a></p>

<p><code>#include &lt;ArNMEAParser.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structArNMEAParser_1_1Message.html">Message</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structArNMEAParser_1_1Message.html" title="Message data passed to handlers. ">Message</a> data passed to handlers.  <a href="structArNMEAParser_1_1Message.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0744dbcce314aac3cf0d8387ac2bae28"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="classArNMEAParser.html#a0744dbcce314aac3cf0d8387ac2bae28a15b7b1736ed0433731f8525c363f04da">ParseFinished</a> = 1, 
<a class="el" href="classArNMEAParser.html#a0744dbcce314aac3cf0d8387ac2bae28a7420adb873f17180380687ff37d95b22">ParseError</a> = 2, 
<a class="el" href="classArNMEAParser.html#a0744dbcce314aac3cf0d8387ac2bae28a71fc6402dd75c50d6a3d19c47f3c2515">ParseData</a> = 4, 
<a class="el" href="classArNMEAParser.html#a0744dbcce314aac3cf0d8387ac2bae28acd335e880741f24c2214c2decf8f6569">ParseUpdated</a> = 8
 }<tr class="memdesc:a0744dbcce314aac3cf0d8387ac2bae28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to indicates what the parse() method did.  <a href="classArNMEAParser.html#a0744dbcce314aac3cf0d8387ac2bae28">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a0744dbcce314aac3cf0d8387ac2bae28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27614b91ab3c5867ec63aac920085911"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="structArNMEAParser_1_1Message.html">ArNMEAParser::Message</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#a27614b91ab3c5867ec63aac920085911">Handler</a></td></tr>
<tr class="memdesc:a27614b91ab3c5867ec63aac920085911"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMEA message handler type.  <a href="#a27614b91ab3c5867ec63aac920085911">More...</a><br /></td></tr>
<tr class="separator:a27614b91ab3c5867ec63aac920085911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f7534a19606eef79b6aacf4f50fca5f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f7534a19606eef79b6aacf4f50fca5f"></a>
typedef std::map&lt; std::string, <a class="el" href="classArNMEAParser.html#a27614b91ab3c5867ec63aac920085911">ArNMEAParser::Handler</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>HandlerMap</b></td></tr>
<tr class="separator:a6f7534a19606eef79b6aacf4f50fca5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1bca7653697d031218526dd174f6cb6"><td class="memItemLeft" align="right" valign="top">typedef std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#ad1bca7653697d031218526dd174f6cb6">MessageVector</a></td></tr>
<tr class="memdesc:ad1bca7653697d031218526dd174f6cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMEA message, divided into parts.  <a href="#ad1bca7653697d031218526dd174f6cb6">More...</a><br /></td></tr>
<tr class="separator:ad1bca7653697d031218526dd174f6cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aca42b6a20a0a386a43ec5bb134db1378"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#aca42b6a20a0a386a43ec5bb134db1378">addHandler</a> (const char *messageID, <a class="el" href="classArNMEAParser.html#a27614b91ab3c5867ec63aac920085911">ArNMEAParser::Handler</a> *handler)</td></tr>
<tr class="memdesc:aca42b6a20a0a386a43ec5bb134db1378"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a handler for an NMEA message.  <a href="#aca42b6a20a0a386a43ec5bb134db1378">More...</a><br /></td></tr>
<tr class="separator:aca42b6a20a0a386a43ec5bb134db1378"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6753f888a5d582c31d7711cc681f83e1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#a6753f888a5d582c31d7711cc681f83e1">ArNMEAParser</a> (const char *name=&quot;NMEA Parser&quot;)</td></tr>
<tr class="separator:a6753f888a5d582c31d7711cc681f83e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3565e04c8437ac56678f7d60140be2c4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3565e04c8437ac56678f7d60140be2c4"></a>
const ArNMEAParser::HandlerMap &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getHandlersRef</b> () const </td></tr>
<tr class="separator:a3565e04c8437ac56678f7d60140be2c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa4ca5ff392e430f255083e4ecc73d23"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa4ca5ff392e430f255083e4ecc73d23"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>parse</b> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *dev)</td></tr>
<tr class="separator:aaa4ca5ff392e430f255083e4ecc73d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91a9d5fbaa2de7a0e57346a0478e838d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91a9d5fbaa2de7a0e57346a0478e838d"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>parse</b> (const char *buf, int n)</td></tr>
<tr class="separator:a91a9d5fbaa2de7a0e57346a0478e838d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab03607dba92513da3bfb1da75297207"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aab03607dba92513da3bfb1da75297207"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>removeHandler</b> (const char *messageID)</td></tr>
<tr class="separator:aab03607dba92513da3bfb1da75297207"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaff0c3a09d1bcf634f7172fc0ea3c6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adaff0c3a09d1bcf634f7172fc0ea3c6d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#adaff0c3a09d1bcf634f7172fc0ea3c6d">setIgnoreChecksum</a> (bool ignore)</td></tr>
<tr class="memdesc:adaff0c3a09d1bcf634f7172fc0ea3c6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set whether checksum is ignored (default behavior is not to ignore it, and skip messages with incorrect checksums, and log a warning mesage) <br /></td></tr>
<tr class="separator:adaff0c3a09d1bcf634f7172fc0ea3c6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aef94d5aad9cf707aca899bb2c948dadf"><td class="memItemLeft" align="right" valign="top">enum ArNMEAParser:: { ... } &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArNMEAParser.html#aef94d5aad9cf707aca899bb2c948dadf">ParseFlags</a></td></tr>
<tr class="memdesc:aef94d5aad9cf707aca899bb2c948dadf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to indicates what the parse() method did.  <a href="#aef94d5aad9cf707aca899bb2c948dadf">More...</a><br /></td></tr>
<tr class="separator:aef94d5aad9cf707aca899bb2c948dadf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>NMEA Parser. </p>
<p>Parses NMEA input data and calls callbacks for certain messages with message parts. NMEA is a standard output data protocol used by GPS devices and others (e.g. compass, altimiter, etc.) This class is used internally by <a class="el" href="classArNMEAParser.html" title="NMEA Parser. ">ArNMEAParser</a> and subclasses, and by <a class="el" href="classArTCMCompassDirect.html" title="Talk to a compass directly over a computer serial port. ">ArTCMCompassDirect</a>. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a27614b91ab3c5867ec63aac920085911"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt;<a class="el" href="structArNMEAParser_1_1Message.html">ArNMEAParser::Message</a>&gt; <a class="el" href="classArNMEAParser.html#a27614b91ab3c5867ec63aac920085911">ArNMEAParser::Handler</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NMEA message handler type. </p>

</div>
</div>
<a class="anchor" id="ad1bca7653697d031218526dd174f6cb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;std::string&gt; <a class="el" href="classArNMEAParser.html#ad1bca7653697d031218526dd174f6cb6">ArNMEAParser::MessageVector</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>NMEA message, divided into parts. </p>

</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a0744dbcce314aac3cf0d8387ac2bae28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to indicates what the parse() method did. </p>
<p>i.e. If nothing was done, then the result will be 0. To check a parse() return result <em>result</em> to see if data was updated, use (result &amp; ParseUpdated). To check if there was an error, use (result &amp; ParseError). </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a0744dbcce314aac3cf0d8387ac2bae28a15b7b1736ed0433731f8525c363f04da"></a>ParseFinished&#160;</td><td class="fielddoc">
<p>There was no data to parse. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0744dbcce314aac3cf0d8387ac2bae28a7420adb873f17180380687ff37d95b22"></a>ParseError&#160;</td><td class="fielddoc">
<p>There was an error. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0744dbcce314aac3cf0d8387ac2bae28a71fc6402dd75c50d6a3d19c47f3c2515"></a>ParseData&#160;</td><td class="fielddoc">
<p>Input was recieved and stored, but no complete messages were parsed. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a0744dbcce314aac3cf0d8387ac2bae28acd335e880741f24c2214c2decf8f6569"></a>ParseUpdated&#160;</td><td class="fielddoc">
<p>At least one complete message was parsed. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6753f888a5d582c31d7711cc681f83e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArNMEAParser::ArNMEAParser </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;NMEA&#160;Parser&quot;</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>Used in log messages </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aca42b6a20a0a386a43ec5bb134db1378"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArNMEAParser::addHandler </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>messageID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArNMEAParser.html#a27614b91ab3c5867ec63aac920085911">ArNMEAParser::Handler</a> *&#160;</td>
          <td class="paramname"><em>handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a handler for an NMEA message. </p>
<p>Mostly for internal use or to be used by related classes, but you could use for ususual or custom messages emitted by a device that you wish to be handled outside of the <a class="el" href="classArNMEAParser.html" title="NMEA Parser. ">ArNMEAParser</a> class. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">messageID</td><td>ID of NMEA sentence/message, without two-letter "talker" prefix. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aef94d5aad9cf707aca899bb2c948dadf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum { ... }   ArNMEAParser::ParseFlags</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to indicates what the parse() method did. </p>
<p>i.e. If nothing was done, then the result will be 0. To check a parse() return result <em>result</em> to see if data was updated, use (result &amp; ParseUpdated). To check if there was an error, use (result &amp; ParseError). </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArNMEAParser.h</li>
<li>ArNMEAParser.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArNMEAParser.html">ArNMEAParser</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
